Optimal. Leaf size=81 \[ \frac {\tanh ^{-1}(a+b x)^2}{b}+\frac {(a+b x) \tanh ^{-1}(a+b x)^2}{b}-\frac {2 \tanh ^{-1}(a+b x) \log \left (\frac {2}{1-a-b x}\right )}{b}-\frac {\text {PolyLog}\left (2,-\frac {1+a+b x}{1-a-b x}\right )}{b} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.06, antiderivative size = 81, normalized size of antiderivative = 1.00, number of steps
used = 6, number of rules used = 6, integrand size = 8, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.750, Rules used = {6238, 6021,
6131, 6055, 2449, 2352} \begin {gather*} -\frac {\text {Li}_2\left (-\frac {a+b x+1}{-a-b x+1}\right )}{b}+\frac {(a+b x) \tanh ^{-1}(a+b x)^2}{b}+\frac {\tanh ^{-1}(a+b x)^2}{b}-\frac {2 \log \left (\frac {2}{-a-b x+1}\right ) \tanh ^{-1}(a+b x)}{b} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 2352
Rule 2449
Rule 6021
Rule 6055
Rule 6131
Rule 6238
Rubi steps
\begin {align*} \int \tanh ^{-1}(a+b x)^2 \, dx &=\frac {\text {Subst}\left (\int \tanh ^{-1}(x)^2 \, dx,x,a+b x\right )}{b}\\ &=\frac {(a+b x) \tanh ^{-1}(a+b x)^2}{b}-\frac {2 \text {Subst}\left (\int \frac {x \tanh ^{-1}(x)}{1-x^2} \, dx,x,a+b x\right )}{b}\\ &=\frac {\tanh ^{-1}(a+b x)^2}{b}+\frac {(a+b x) \tanh ^{-1}(a+b x)^2}{b}-\frac {2 \text {Subst}\left (\int \frac {\tanh ^{-1}(x)}{1-x} \, dx,x,a+b x\right )}{b}\\ &=\frac {\tanh ^{-1}(a+b x)^2}{b}+\frac {(a+b x) \tanh ^{-1}(a+b x)^2}{b}-\frac {2 \tanh ^{-1}(a+b x) \log \left (\frac {2}{1-a-b x}\right )}{b}+\frac {2 \text {Subst}\left (\int \frac {\log \left (\frac {2}{1-x}\right )}{1-x^2} \, dx,x,a+b x\right )}{b}\\ &=\frac {\tanh ^{-1}(a+b x)^2}{b}+\frac {(a+b x) \tanh ^{-1}(a+b x)^2}{b}-\frac {2 \tanh ^{-1}(a+b x) \log \left (\frac {2}{1-a-b x}\right )}{b}-\frac {2 \text {Subst}\left (\int \frac {\log (2 x)}{1-2 x} \, dx,x,\frac {1}{1-a-b x}\right )}{b}\\ &=\frac {\tanh ^{-1}(a+b x)^2}{b}+\frac {(a+b x) \tanh ^{-1}(a+b x)^2}{b}-\frac {2 \tanh ^{-1}(a+b x) \log \left (\frac {2}{1-a-b x}\right )}{b}-\frac {\text {Li}_2\left (1-\frac {2}{1-a-b x}\right )}{b}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.05, size = 55, normalized size = 0.68 \begin {gather*} \frac {\tanh ^{-1}(a+b x) \left ((-1+a+b x) \tanh ^{-1}(a+b x)-2 \log \left (1+e^{-2 \tanh ^{-1}(a+b x)}\right )\right )+\text {PolyLog}\left (2,-e^{-2 \tanh ^{-1}(a+b x)}\right )}{b} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 1.85, size = 91, normalized size = 1.12
method | result | size |
derivativedivides | \(\frac {\arctanh \left (b x +a \right )^{2} \left (b x +a -1\right )+2 \arctanh \left (b x +a \right )^{2}-2 \arctanh \left (b x +a \right ) \ln \left (1+\frac {\left (b x +a +1\right )^{2}}{-\left (b x +a \right )^{2}+1}\right )-\polylog \left (2, -\frac {\left (b x +a +1\right )^{2}}{-\left (b x +a \right )^{2}+1}\right )}{b}\) | \(91\) |
default | \(\frac {\arctanh \left (b x +a \right )^{2} \left (b x +a -1\right )+2 \arctanh \left (b x +a \right )^{2}-2 \arctanh \left (b x +a \right ) \ln \left (1+\frac {\left (b x +a +1\right )^{2}}{-\left (b x +a \right )^{2}+1}\right )-\polylog \left (2, -\frac {\left (b x +a +1\right )^{2}}{-\left (b x +a \right )^{2}+1}\right )}{b}\) | \(91\) |
risch | \(\frac {\left (b x +a +1\right ) \ln \left (b x +a +1\right )^{2}}{4 b}+\left (-\frac {\ln \left (-b x -a +1\right ) x}{2}+\frac {-\ln \left (-b x -a +1\right ) a +\ln \left (-b x -a +1\right )}{2 b}\right ) \ln \left (b x +a +1\right )+\frac {x \ln \left (-b x -a +1\right )^{2}}{4}+\frac {\ln \left (-b x -a +1\right )^{2} a}{4 b}-\frac {\ln \left (-b x -a +1\right )^{2}}{4 b}-\frac {\ln \left (\frac {b x}{2}+\frac {a}{2}+\frac {1}{2}\right ) \ln \left (-b x -a +1\right )}{b}+\frac {\ln \left (\frac {b x}{2}+\frac {a}{2}+\frac {1}{2}\right ) \ln \left (-\frac {b x}{2}-\frac {a}{2}+\frac {1}{2}\right )}{b}+\frac {\dilog \left (-\frac {b x}{2}-\frac {a}{2}+\frac {1}{2}\right )}{b}\) | \(186\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 0.26, size = 139, normalized size = 1.72 \begin {gather*} -\frac {1}{4} \, b^{2} {\left (\frac {{\left (a + 1\right )} \log \left (b x + a + 1\right )^{2} - 2 \, {\left (a + 1\right )} \log \left (b x + a + 1\right ) \log \left (b x + a - 1\right ) + {\left (a - 1\right )} \log \left (b x + a - 1\right )^{2}}{b^{3}} + \frac {4 \, {\left (\log \left (b x + a - 1\right ) \log \left (\frac {1}{2} \, b x + \frac {1}{2} \, a + \frac {1}{2}\right ) + {\rm Li}_2\left (-\frac {1}{2} \, b x - \frac {1}{2} \, a + \frac {1}{2}\right )\right )}}{b^{3}}\right )} + b {\left (\frac {{\left (a + 1\right )} \log \left (b x + a + 1\right )}{b^{2}} - \frac {{\left (a - 1\right )} \log \left (b x + a - 1\right )}{b^{2}}\right )} \operatorname {artanh}\left (b x + a\right ) + x \operatorname {artanh}\left (b x + a\right )^{2} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \operatorname {atanh}^{2}{\left (a + b x \right )}\, dx \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [F]
time = 0.00, size = -1, normalized size = -0.01 \begin {gather*} \int {\mathrm {atanh}\left (a+b\,x\right )}^2 \,d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________